#ifndef MAZEVIEW_H
#define MAZEVIEW_H

#include <QObject>
#include <QGraphicsItem>
#include <QGraphicsScene>
#include "mycustomscene.h"

#include "imazemodel.h"

class MazeView : public QObject, public QGraphicsItem
{
    Q_OBJECT
public:
    explicit MazeView(IMazeModel* model, int viewCellSize = 50, QObject *parent = nullptr);
    virtual ~MazeView();

    virtual int width() const;
    virtual int height() const;
    virtual void showPointStart(QPoint start);
    virtual void showPointStop(QPoint stop);

private:
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
    QRectF boundingRect() const override;

signals:

private:
    QVector<QPoint> m_points;
    IMazeModel *m_model;

    const int m_cell_size;
    const int m_width;
    const int m_height;
};

#endif // MAZEVIEW_H
